import KoaRouter from 'koa-router'
import { Models } from '@/common/typings/modle'
import { command } from '@/server/mysql'
import { Success } from '@/core/HttpException'
import Config from '@/config/Config'
import verifyToken from '@/middlewares/verifyToken'
// import { Menu } from '@/common/typings/menu'
// import { Account } from '@/common/typings/account'
const router = new KoaRouter({
  prefix: `${Config.API_PREFIX}v1/system/report`,
})

router.get('/data-view', async (ctx: Models.Ctx) => {
  const info = {
    license: {
      onlineCount: 99,
      totalCount: 100,
    },
    portMapping: {
      onlineCount: 99,
      totalCount: 100,
    },
    todayFlow: {
      upFlowBytes: 0,
      downFlowBytes: 1,
      upFlowDesc: '2',
      downFlowDesc: '3',
      totalFlowDesc: '4',
    },
    totalFlow: {
      upFlowBytes: 0,
      downFlowBytes: 1,
      upFlowDesc: '2',
      downFlowDesc: '3',
      totalFlowDesc: '4',
    },
    last7dFlow: {
      xDate: '',
      text: '',
      title: '近7日数据',
      legendList: [],
      dataList: [],
      seriesList: [
        {
          seriesName: '',
          seriesData: '',
        },
      ],
      list: [
        {
          name: '',
          value: '',
          marker: '',
          seriesName: '',
          data: '',
        },
      ],
    },
  }
  throw new Success({ data: info })
})

export default router
